package scenic.awt;

import java.awt.AWTException;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.ImageCapabilities;
import java.awt.Rectangle;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.VolatileImage;

import scenic.Format;
import scenic.ImageOptions;
import scenic.ScenicImage;

public class ScenicGraphicsConfiguration extends 
	GraphicsConfiguration {

	@Override
	public VolatileImage createCompatibleVolatileImage(int width, int height, ImageCapabilities caps, int transparency) throws AWTException {
		return createCompatibleVolatileImage(width, height);
	}

	@Override
	public VolatileImage createCompatibleVolatileImage(int width, int height, ImageCapabilities caps) throws AWTException {
		return createCompatibleVolatileImage(width, height);
	}

	@Override
	public VolatileImage createCompatibleVolatileImage(int width, int height, int transparency) {
		return createCompatibleVolatileImage(width, height);
	}

	@Override
	public VolatileImage createCompatibleVolatileImage(int width, int height) {
		System.out.println("createCompatibleVolatileImage");
		return new ScenicImage(width, height, Format.A8R8G8B8, ImageOptions.RENDER_TARGET);
	}

	@Override
	public GraphicsDevice getDevice() {
		return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); 
	}

	@Override
	public BufferedImage createCompatibleImage(int width, int height) {
		return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
	}


	@Override
	public BufferedImage createCompatibleImage(int width, int height, int transparency) {
		return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
	}
	
	@Override
	public ColorModel getColorModel() {
		return null;
	}

	@Override
	public ColorModel getColorModel(int transparency) {
		return null;
	}

	@Override
	public AffineTransform getDefaultTransform() {
		return new AffineTransform();
	}

	@Override
	public AffineTransform getNormalizingTransform() {
		return new AffineTransform();
	}

	@Override
	public Rectangle getBounds() {
		return null;
	}
}
